#!/bin/bash
#广州图书馆
#GZLIB=`mysql -uroot -p1234-qwer -h10.64.2.234 -N -e "select ifnull(sum(success),0) from IGD_Analysis.FactAuthSummaryVendor_RT where time >=(now() - interval 30 minute) and time <now() and Vendor = 'SITE-GN1012-GZTSG';"`
GZLIB=`mysql -uroot -p1234-qwer -h10.64.2.10 -N -e "select ifnull(sum(success),0) from IGD_Analysis.FactAuthSummaryVendor_RT where time >=(now() - interval 30 minute) and time <now() and Vendor = 'GZTSG';"`

#越秀图书馆
YXLIB=`mysql -uroot -p1234-qwer -h10.64.2.10 -N -e "select ifnull(sum(success),0) from IGD_Analysis.FactAuthSummary_RT where time >=(now() - interval 60 minute) and time <now() and userlocation = 'SITE-GN1006-YXQTSG';"`


zabbix_sender -s "IGDMonitor" -z 10.64.2.10 -k GZLIB -o ${GZLIB}
zabbix_sender -s "IGDMonitor" -z 10.64.2.10 -k YXLIB -o ${YXLIB}
